
package com.probiz.estore.exception;

import com.probiz.estore.core.util.I18nUtil;

public class ShopPointConsumptionException extends Exception {

	private static final long	serialVersionUID	= 2L;
	private int	availableShopPoint;		//可使用的积分数
	private int	consumedShopPoint;		//使用的积分数

	public ShopPointConsumptionException() {
		super();
	}

	public ShopPointConsumptionException(int availableShopPoint, int consumedShopPoint) {
		super();
		this.availableShopPoint = availableShopPoint;
		this.consumedShopPoint = consumedShopPoint;
	}


	@Override
	public String getMessage() {
		return I18nUtil.getInstance().getMessage("shopPoint.error.consumptionException",
				new Object[] {Integer.valueOf(consumedShopPoint), Integer.valueOf(availableShopPoint)});
	}

	public int getAvailableShopPoint() {
		return availableShopPoint;
	}

	public void setAvailableShopPoint(int availableShopPoint) {
		this.availableShopPoint = availableShopPoint;
	}

	public int getConsumedShopPoint() {
		return consumedShopPoint;
	}

	public void setConsumedShopPoint(int consumedShopPoint) {
		this.consumedShopPoint = consumedShopPoint;
	}
}
